var status

function init() {
	getByEmailUser()
}

function getByEmailUser() {
	$.ajax({
		url: "http://101.37.77.75:8080/lagouwang/UserServlet?t=getByEmailUser",
		async: false,
		type: 'post',
		dataType: "json",
		xhrFields: {
			withCredentials: true
		},
		success: function(data) {
			status=data.status
			if(status !=0) {
				var username = $("#username")
				var username1 = $("#username1")
				var email1 = $("#email1")
				email1.html(data.data[0].email)
				username.html(data.data[0].name)
				username1.html(data.data[0].name)
			} else {
				alert(data.msg)
				location.href = "login.html"
			}
		}
	})
}

function jumpCompany(){
	if (status==2) {
		location.href = "myhome.html"
	} 
	if (status==3) {
		location.href = "index01.html"
	}
}

function jumpURL(){
	location.href="preview.html?resumeid=" + userid
}
